/**
 * 
 */
package com.google.code.jkippt.query;

/**
 * @author Federico De Faveri defaveri@gmail.com
 *
 */
public class SearchQueryBuilder {
	
	protected SearchQuery query;
	
	public SearchQueryBuilder(String terms)
	{
		query = new SearchQuery(terms);
	}
	
	/**
	 * The resulting Clips belongs to the specified list.
	 * @param listId
	 * @return
	 */
	public SearchQueryBuilder inList(String listId)
	{
		query.setListId(listId);
		return this;
	}
	
	/**
	 * The resulting Clips are starred.
	 * @return
	 */
	public SearchQueryBuilder starred()
	{
		query.setIsStarred(true);
		return this;
	}
	
	/**
	 * The resulting Clips are not starred.
	 * @return
	 */
	public SearchQueryBuilder notStarred()
	{
		query.setIsStarred(false);
		return this;
	}
	
	/**
	 * Builds the {@link SearchQuery}.
	 * @return
	 */
	public SearchQuery build()
	{
		return query;
	}


}
